import PageLayout from "../../layout/PageLayout.vue";

export default {
  path: "/authority",
  name: "authority",
  component: PageLayout,
  meta: { title: "权限管理", root: true },
  children: [
    {
      path: "role",
      name: "authority-role",
      component: () => import("../../views/authority/RoleList.vue"),
      meta: {
        title: "角色列表",
        buttons: [
          {
            name: "authority-role:create",
            meta: {
              title: "添加",
            },
          },
          {
            name: "authority-role:edit",
            meta: {
              title: "编辑",
            },
          },
          {
            name: "authority-role:delete",
            meta: {
              title: "删除",
            },
          },
          {
            name: "authority-role:permission",
            meta: {
              title: "分配权限",
            },
          },
        ],
      },
    },
    {
      path: "user",
      name: "authority-user",
      component: () => import("../../views/authority/UserList.vue"),
      meta: {
        title: "用户列表",
        buttons: [
          {
            name: "authority-user:create",
            meta: {
              title: "添加",
            },
          },
          {
            name: "authority-user:edit",
            meta: {
              title: "编辑",
            },
          },
          {
            name: "authority-user:delete",
            meta: {
              title: "删除",
            },
          },
          {
            name: "authority-user:role",
            meta: {
              title: "分配角色",
            },
          },
        ],
      },
    },
  ],
};
